

import java.util.Calendar;

import org.junit.Test;

import static org.junit.Assert.*;


public class WhenSummertimeIsChecked {
	
	@Test
	public void andWeWantToKnowTheStartOfSummerTimeIn2012WeShouldGet25_March_2012() {
		Calendar summertimeStart = SummerTimeChecks.getSummertimeStart(2012);
		Calendar expected = Calendar.getInstance();
		expected.set(2012, Calendar.MARCH, 25);
		assertEquals(expected.get(Calendar.YEAR),summertimeStart.get(Calendar.YEAR));
		assertEquals(expected.get(Calendar.MONTH),summertimeStart.get(Calendar.MONTH));
		assertEquals(expected.get(Calendar.DAY_OF_MONTH),summertimeStart.get(Calendar.DAY_OF_MONTH));

	}
	
	@Test
	public void andWeWantToKnowTheEndOfSummerTimeIn2012WeShouldGet28_October_2012() {
		Calendar summertimeEnd = SummerTimeChecks.getSummertimeEnd(2012);
		Calendar expected = Calendar.getInstance();
		expected.set(2012, Calendar.OCTOBER, 28);
		assertEquals(expected.get(Calendar.YEAR),summertimeEnd.get(Calendar.YEAR));
		assertEquals(expected.get(Calendar.MONTH),summertimeEnd.get(Calendar.MONTH));
		assertEquals(expected.get(Calendar.DAY_OF_MONTH),summertimeEnd.get(Calendar.DAY_OF_MONTH));

	}


}
